<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>智慧题库 - 管理后台</title>
    <link href="../assets/css/tailwind.css" rel="stylesheet">
    <link href="../assets/css/font-awesome.min.css" rel="stylesheet">
</head>
<body class="font-inter bg-gray-50 min-h-screen flex flex-col bg-education">
    <!-- 背景装饰元素 -->
    <div class="absolute inset-0 overflow-hidden -z-10">
        <div class="absolute top-10 left-10 w-40 h-40 rounded-full bg-primary/10 animate-float">
            <div class="w-full h-full flex items-center justify-center text-primary/20 text-6xl education-icon">
                <i class="fa fa-book"></i>
            </div>
        </div>
        <div class="absolute bottom-20 right-20 w-60 h-60 rounded-full bg-secondary/10 animate-float" style="animation-delay: -2s">
            <div class="w-full h-full flex items-center justify-center text-secondary/20 text-7xl education-icon">
                <i class="fa fa-graduation-cap"></i>
            </div>
        </div>
        <div class="absolute top-1/3 right-1/4 w-32 h-32 rounded-full bg-accent/10 animate-float" style="animation-delay: -4s">
            <div class="w-full h-full flex items-center justify-center text-accent/20 text-5xl education-icon">
                <i class="fa fa-lightbulb-o"></i>
            </div>
        </div>
        <div class="absolute bottom-1/3 left-1/3 w-28 h-28 rounded-full bg-primary/10 animate-float" style="animation-delay: -1s">
            <div class="w-full h-full flex items-center justify-center text-primary/20 text-4xl education-icon">
                <i class="fa fa-pencil-square-o"></i>
            </div>
        </div>
    </div>

    <!-- 顶部导航栏 -->
    <header class="sticky top-0 z-50 bg-white/90 backdrop-blur-sm shadow-sm transition-all duration-300">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <div class="flex items-center space-x-2">
                <div class="w-10 h-10 bg-primary/10 rounded-xl flex items-center justify-center text-primary">
                    <i class="fa fa-question-circle"></i>
                </div>
                <h1 class="text-xl font-bold text-dark ml-0 md:ml-[-2rem]">智慧题库管理系统</h1>
            </div>
            
            <!-- 顶部导航 -->
            <div class="hidden md:flex items-center space-x-2">
                <a href="AdminDashboard.html" class="nav-item active">
                    <i class="fa fa-home mr-2"></i> 控制面板
                </a>
                <a href="QuestionManagement.html" class="nav-item">
                    <i class="fa fa-book mr-2"></i> 题库管理
                </a>
                <a href="ExamManagement.html" class="nav-item">
                    <i class="fa fa-graduation-cap mr-2"></i> 考试管理
                </a>
                <a href="StatisticsAnalysis.html" class="nav-item">
                    <i class="fa fa-bar-chart mr-2"></i> 数据分析
                </a>
                <a href="SystemSettings.html" class="nav-item">
                    <i class="fa fa-cog mr-2"></i> 系统设置
                </a>
            </div>
            
            <div class="flex items-center space-x-4">
                <button class="p-2 text-muted hover:text-primary transition-colors relative">
                    <i class="fa fa-bell"></i>
                    <span class="absolute top-1 right-1 w-2 h-2 bg-accent rounded-full"></span>
                </button>
                <div class="flex items-center space-x-2">
                    <img src="https://picsum.photos/id/64/40/40" alt="用户头像" class="w-8 h-8 rounded-full object-cover border-2 border-primary/20">
                    <span class="hidden md:inline text-sm font-medium text-dark">张老师</span>
                    <i class="fa fa-angle-down text-muted"></i>
                </div>
                <button class="md:hidden p-2 text-muted hover:text-primary transition-colors" id="mobile-menu-button">
                    <i class="fa fa-bars"></i>
                </button>
            </div>
        </div>
    </header>

    <!-- 主内容区 -->
    <main class="flex-grow flex">
        <!-- 左侧导航栏 -->
        <aside id="sidebar" class="w-64 bg-sidebar-bg shadow-sidebar transition-all duration-300 h-[calc(100vh-64px)] sticky top-[64px] overflow-y-auto">
            <!-- 仪表盘菜单 -->
            <div id="dashboard-menu" class="sidebar-menu active">
                <div class="p-4 border-b border-gray-200">
                    <h3 class="text-sm font-medium text-muted uppercase tracking-wider">仪表盘</h3>
                </div>
                <div class="p-2">
                    <div class="sidebar-item active">
                        <i class="fa fa-tachometer"></i>
                        <span>数据概览</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-line-chart"></i>
                        <span>趋势分析</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-pie-chart"></i>
                        <span>数据报表</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-bullhorn"></i>
                        <span>系统通知</span>
                    </div>
                </div>
            </div>
            
            <!-- 题库管理菜单 -->
            <div id="question-menu" class="sidebar-menu hidden">
                <div class="p-4 border-b border-gray-200">
                    <h3 class="text-sm font-medium text-muted uppercase tracking-wider">题库管理</h3>
                </div>
                <div class="p-2">
                    <div class="sidebar-item">
                        <i class="fa fa-list-alt"></i>
                        <span>题目列表</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-plus-circle"></i>
                        <span>添加题目</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-folder"></i>
                        <span>题目分类</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-tags"></i>
                        <span>标签管理</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-flag"></i>
                        <span>待审核题目</span>
                    </div>
                </div>
            </div>
            
            <!-- 考试管理菜单 -->
            <div id="exam-menu" class="sidebar-menu hidden">
                <div class="p-4 border-b border-gray-200">
                    <h3 class="text-lg font-bold text-center text-muted uppercase tracking-wider">考试管理</h3>
                </div>
                <div class="p-2">
                    <div class="sidebar-item">
                        <i class="fa fa-calendar"></i>
                        <span>考试安排</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-file-text-o"></i>
                        <span>试卷管理</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-plus-circle"></i>
                        <span>创建试卷</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-users"></i>
                        <span>考生管理</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-check-square-o"></i>
                        <span>成绩管理</span>
                    </div>
                </div>
            </div>
            
            <!-- 数据分析菜单 -->
            <div id="statistics-menu" class="sidebar-menu hidden">
                <div class="p-4 border-b border-gray-200">
                    <h3 class="text-sm font-medium text-muted uppercase tracking-wider">数据分析</h3>
                </div>
                <div class="p-2">
                    <div class="sidebar-item">
                        <i class="fa fa-bar-chart"></i>
                        <span>答题统计</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-area-chart"></i>
                        <span>学习进度</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-pie-chart"></i>
                        <span>正确率分析</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-user-circle"></i>
                        <span>用户行为</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-download"></i>
                        <span>数据导出</span>
                    </div>
                </div>
            </div>
            
            <!-- 系统设置菜单 -->
            <div id="settings-menu" class="sidebar-menu hidden">
                <div class="p-4 border-b border-gray-200">
                    <h3 class="text-sm font-medium text-muted uppercase tracking-wider">系统设置</h3>
                </div>
                <div class="p-2">
                    <div class="sidebar-item">
                        <i class="fa fa-globe"></i>
                        <span>站点设置</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-user-plus"></i>
                        <span>注册设置</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-cog"></i>
                        <span>基础设置</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-shield"></i>
                        <span>安全设置</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-users"></i>
                        <span>角色权限</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-database"></i>
                        <span>数据备份</span>
                    </div>
                </div>
            </div>
        </aside>

        <!-- 内容区域 -->
        <div class="flex-grow p-6">
            <!-- 仪表盘内容 -->
            <div id="dashboard-content" class="content-section active">
                <!-- 页面标题 -->
                <div class="mb-8">
                    <h2 class="text-[clamp(1.5rem,3vw,2rem)] font-bold text-dark">数据概览</h2>
                    <p class="text-muted mt-2">今日是 <span id="currentDate" class="font-medium text-dark"></span>，题库管理系统为您提供全面的试题管理功能</p>
                </div>
                
                <!-- 数据统计卡片 -->
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
                    <div class="stat-card rounded-2xl p-6 card-hover">
                        <div class="flex items-start justify-between">
                            <div>
                                <p class="text-muted text-sm">总题目数</p>
                                <h3 class="text-3xl font-bold text-dark mt-1">1,284</h3>
                                <p class="text-accent text-sm mt-2 flex items-center">
                                    <i class="fa fa-arrow-up mr-1"></i> 12% 较上月
                                </p>
                            </div>
                            <div class="w-12 h-12 bg-primary/10 rounded-xl flex items-center justify-center text-primary">
                                <i class="fa fa-question-circle text-xl"></i>
                            </div>
                        </div>
                    </div>
                    
                    <div class="stat-card rounded-2xl p-6 card-hover">
                        <div class="flex items-start justify-between">
                            <div>
                                <p class="text-muted text-sm">用户总数</p>
                                <h3 class="text-3xl font-bold text-dark mt-1">3,521</h3>
                                <p class="text-accent text-sm mt-2 flex items-center">
                                    <i class="fa fa-arrow-up mr-1"></i> 8% 较上月
                                </p>
                            </div>
                            <div class="w-12 h-12 bg-secondary/10 rounded-xl flex items-center justify-center text-secondary">
                                <i class="fa fa-users text-xl"></i>
                            </div>
                        </div>
                    </div>
                    
                    <div class="stat-card rounded-2xl p-6 card-hover">
                        <div class="flex items-start justify-between">
                            <div>
                                <p class="text-muted text-sm">今日答题</p>
                                <h3 class="text-3xl font-bold text-dark mt-1">247</h3>
                                <p class="text-muted text-sm mt-2 flex items-center">
                                    <i class="fa fa-minus mr-1"></i> 与昨日持平
                                </p>
                            </div>
                            <div class="w-12 h-12 bg-accent/10 rounded-xl flex items-center justify-center text-accent">
                                <i class="fa fa-check-circle text-xl"></i>
                            </div>
                        </div>
                    </div>
                    
                    <div class="stat-card rounded-2xl p-6 card-hover">
                        <div class="flex items-start justify-between">
                            <div>
                                <p class="text-muted text-sm">待审核题目</p>
                                <h3 class="text-3xl font-bold text-dark mt-1">16</h3>
                                <p class="text-primary text-sm mt-2 flex items-center cursor-pointer hover:underline">
                                    <i class="fa fa-angle-right mr-1"></i> 去审核
                                </p>
                            </div>
                            <div class="w-12 h-12 bg-primary/10 rounded-xl flex items-center justify-center text-primary">
                                <i class="fa fa-clock-o text-xl"></i>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 数据图表和最近活动 -->
                <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
                    <!-- 答题趋势图表 -->
                    <div class="lg:col-span-2 bg-white rounded-2xl p-6 shadow-card">
                        <div class="flex items-center justify-between mb-6">
                            <h3 class="text-lg font-bold text-dark">本周答题趋势</h3>
                            <div class="flex space-x-2">
                                <button class="px-3 py-1 text-sm bg-primary/10 text-primary rounded-lg">周</button>
                                <button class="px-3 py-1 text-sm text-muted hover:text-primary">月</button>
                                <button class="px-3 py-1 text-sm text-muted hover:text-primary">年</button>
                            </div>
                        </div>
                        <div class="chart-container">
                            <!-- 这里可以放置图表组件 -->
                            <div class="w-full h-full flex items-center justify-center text-muted">
                                <div class="text-center">
                                    <i class="fa fa-bar-chart text-4xl mb-4"></i>
                                    <p>图表区域</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 最近活动 -->
                    <div class="bg-white rounded-2xl p-6 shadow-card">
                        <h3 class="text-lg font-bold text-dark mb-6">最近活动</h3>
                        <div class="space-y-4">
                            <div class="flex items-start space-x-3">
                                <div class="w-8 h-8 bg-primary/10 rounded-full flex items-center justify-center text-primary text-sm">
                                    <i class="fa fa-plus"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="text-sm text-dark">新增题目 15 道</p>
                                    <p class="text-xs text-muted mt-1">2小时前</p>
                                </div>
                            </div>
                            <div class="flex items-start space-x-3">
                                <div class="w-8 h-8 bg-accent/10 rounded-full flex items-center justify-center text-accent text-sm">
                                    <i class="fa fa-user"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="text-sm text-dark">新用户注册 8 人</p>
                                    <p class="text-xs text-muted mt-1">4小时前</p>
                                </div>
                            </div>
                            <div class="flex items-start space-x-3">
                                <div class="w-8 h-8 bg-secondary/10 rounded-full flex items-center justify-center text-secondary text-sm">
                                    <i class="fa fa-check"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="text-sm text-dark">审核通过 12 道题</p>
                                    <p class="text-xs text-muted mt-1">6小时前</p>
                                </div>
                            </div>
                            <div class="flex items-start space-x-3">
                                <div class="w-8 h-8 bg-warning/10 rounded-full flex items-center justify-center text-warning text-sm">
                                    <i class="fa fa-exclamation"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="text-sm text-dark">系统维护完成</p>
                                    <p class="text-xs text-muted mt-1">1天前</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 题目列表 -->
                <div class="mt-8 bg-white rounded-2xl shadow-card">
                    <div class="p-6 border-b border-gray-200">
                        <div class="flex items-center justify-between">
                            <h3 class="text-lg font-bold text-dark">最新题目</h3>
                            <button class="px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors">
                                <i class="fa fa-plus mr-2"></i>添加题目
                            </button>
                        </div>
                    </div>
                    <div class="overflow-x-auto">
                        <table class="min-w-full divide-y divide-gray-200">
                            <thead class="bg-gray-50">
                                <tr>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">题目ID</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">题目内容</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">类型</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">难度</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">分类</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">创建时间</th>
                                    <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">操作</th>
                                </tr>
                            </thead>
                            <tbody class="bg-white divide-y divide-gray-200">
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-muted">Q-1001</td>
                                    <td class="px-6 py-4 max-w-xs truncate">已知二次函数 y = x² + bx + c 的图像经过点 (1, 0) 和 (2, 5)，求 b 和 c 的值。</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-dark">解答题</td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">中等</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-dark">数学 > 代数</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-muted">2023-06-20</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                        <button class="text-primary hover:text-primary/80 mr-3">
                                            <i class="fa fa-edit"></i>
                                        </button>
                                        <button class="text-red-500 hover:text-red-600">
                                            <i class="fa fa-trash"></i>
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-muted">Q-1002</td>
                                    <td class="px-6 py-4 max-w-xs truncate">以下哪个是Python的内置函数？</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-dark">选择题</td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">简单</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-dark">编程 > Python</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-muted">2023-06-19</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                        <button class="text-primary hover:text-primary/80 mr-3">
                                            <i class="fa fa-edit"></i>
                                        </button>
                                        <button class="text-red-500 hover:text-red-600">
                                            <i class="fa fa-trash"></i>
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-muted">Q-1003</td>
                                    <td class="px-6 py-4 max-w-xs truncate">描述一下HTML5中新增的语义化标签及其作用。</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-dark">简答题</td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">中等</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-dark">Web开发 > HTML</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-muted">2023-06-18</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                        <button class="text-primary hover:text-primary/80 mr-3">
                                            <i class="fa fa-edit"></i>
                                        </button>
                                        <button class="text-red-500 hover:text-red-600">
                                            <i class="fa fa-trash"></i>
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-muted">Q-1004</td>
                                    <td class="px-6 py-4 max-w-xs truncate">在SQL中，如何实现两个表的内连接？请给出示例。</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-dark">操作题</td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">较难</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-dark">数据库 > SQL</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-muted">2023-06-17</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                        <button class="text-primary hover:text-primary/80 mr-3">
                                            <i class="fa fa-edit"></i>
                                        </button>
                                        <button class="text-red-500 hover:text-red-600">
                                            <i class="fa fa-trash"></i>
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-muted">Q-1005</td>
                                    <td class="px-6 py-4 max-w-xs truncate">什么是算法的时间复杂度？请解释O(1)、O(n)和O(n²)的含义。</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-dark">概念题</td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-purple-100 text-purple-800">困难</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-dark">计算机基础 > 算法</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-muted">2023-06-16</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                        <button class="text-primary hover:text-primary/80 mr-3">
                                            <i class="fa fa-edit"></i>
                                        </button>
                                        <button class="text-red-500 hover:text-red-600">
                                            <i class="fa fa-trash"></i>
                                        </button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    
                    <!-- 分页 -->
                    <div class="flex items-center justify-between mt-6">
                        <div class="text-sm text-muted">
                            显示 <span class="font-medium">1</span> 到 <span class="font-medium">5</span> 条，共 <span class="font-medium">1,284</span> 条
                        </div>
                        <div class="flex space-x-1">
                            <button class="px-3 py-1 rounded-lg border border-gray-300 text-muted hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed" disabled>
                                <i class="fa fa-angle-left"></i>
                            </button>
                            <button class="px-3 py-1 rounded-lg bg-primary text-white">1</button>
                            <button class="px-3 py-1 rounded-lg border border-gray-300 text-muted hover:bg-gray-50">2</button>
                            <button class="px-3 py-1 rounded-lg border border-gray-300 text-muted hover:bg-gray-50">3</button>
                            <button class="px-3 py-1 rounded-lg border border-gray-300 text-muted hover:bg-gray-50">4</button>
                            <button class="px-3 py-1 rounded-lg border border-gray-300 text-muted hover:bg-gray-50">5</button>
                            <button class="px-3 py-1 rounded-lg border border-gray-300 text-muted hover:bg-gray-50">
                                <i class="fa fa-angle-right"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>

    <!-- JavaScript -->
    <script>
        // 设置当前日期
        document.addEventListener('DOMContentLoaded', function() {
            const now = new Date();
            const options = { year: 'numeric', month: 'long', day: 'numeric', weekday: 'long' };
            document.getElementById('currentDate').textContent = now.toLocaleDateString('zh-CN', options);
            
            // 移动端菜单切换
            const mobileMenuButton = document.getElementById('mobile-menu-button');
            const sidebar = document.getElementById('sidebar');
            
            if (mobileMenuButton && sidebar) {
                mobileMenuButton.addEventListener('click', function() {
                    sidebar.classList.toggle('translate-x-0');
                    sidebar.classList.toggle('-translate-x-full');
                });
            }
            
            // 初始化移动端侧边栏状态
            function checkScreenSize() {
                if (window.innerWidth < 768) {
                    sidebar.classList.add('-translate-x-full');
                    sidebar.classList.remove('translate-x-0');
                } else {
                    sidebar.classList.remove('-translate-x-full');
                    sidebar.classList.add('translate-x-0');
                }
            }
            
            // 初始检查
            checkScreenSize();
            
            // 窗口大小变化时检查
            window.addEventListener('resize', checkScreenSize);
        });
    </script>
</body>
</html>
